//
//  BaseNaviViewController.swift
//  WeiBoSwift
//
//  Created by 吴斌 on 2022/9/21.
//

import UIKit

class BaseNaviViewController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        configNavIOS15()
        
    }
}

//处理iOS15导航栏颜色变成透明
extension BaseNaviViewController {
     func configNavIOS15() {
        if #available(iOS 15.0, *) {
            let appearance = UINavigationBarAppearance()
            appearance.configureWithOpaqueBackground()
            appearance.backgroundColor = UIColor.white
            navigationBar.standardAppearance = appearance
            navigationBar.scrollEdgeAppearance = appearance
        }
    }
}
